<link rel="stylesheet" type="text/css" href="/site_media/css/addcard.css" />
<link type="text/css" href="/site_media/js/jquery/ui/themes/base/ui.all.css" rel="stylesheet" />
<script language="javascript" src="/site_media/js/jquery/ui/ui/ui.core.js"></script>
<link rel="stylesheet" type="text/css" href="/site_media/css/colorpicker.css" />
<script language="javascript" src="/site_media/js/jquery/jquery.js"></script>
<script language="javascript" src="/site_media/js/jquery/ui/ui/iColorPicker.js"></script>

<script type="text/javascript" src="/site_media/js/jquery/ui/ui/ui.datepicker.js"></script>

<script type="text/javascript">
  $(function() {
    $("#startdate").datepicker();
  });
  $(function() {
    $("#enddate").datepicker();
  });


$(function(){
 	if({{ wall_id }})
	{
		$("#cardForm").attr("action","/cardwall/add_card/{{wall_id}}");		
	}
	else
	{
		$("#cardForm").attr("action","/cardwall/edit_card/{{card_details.id}}");
	}	
 });
  
$(document).ready(function(){
	if ({{ wall_id }})
	{
		$("#header").addClass("add").removeClass("edit");
	}
	
});
</script>
<html>
<body>
  <form id="cardForm" method="POST">
    <h1 id="header" class="edit">{{ heading }}</h1>  
	<div class="divContent">
      <div>
		<p>
		  <label for="card_title" class="labelText">Title:</label> 
		  <input type="text" id="card_title" name="card_title" class="cardLargeText" value="{{ card_details.title }}" />
		</p>
		<p>
		  <label for="startdate" class="labelText">Start:</label> 
		  <input type="text" id="startdate" class="cardDateText" name="startdate" value="{{ card_details.start_date }}" />

		  <label for="enddate" class="labelTextSmall">End:</label> 
		  <input type="text" id="enddate" class="cardDateText" name="enddate" value="{{ card_details.end_date }}" />
		</p>
		<p>
		  <label for="card_devs" class="labelText">Developers:</label> 
		  <input type="text" id="card_devs" class="cardLargeText" name="card_devs"value="{{ card_details.developers }}" />
		</p>
		<p>
		  <label for="card_color" class="labelText">Color:</label> 
		  <input type="text" id="card_color" class="iColorPicker cardSmallText" name="card_color" value="{{ card_details.card_color }}" />
		</p>
		<p>
		  <label for="card_points" class="labelText" >Points:</label> 
		  <input type="text" id="card_points" class="cardSmallText" name="card_points" value="{{ card_details.points }}" />
		</p>
		
		<p>
		  <label for="card_desc" class="labelText">Descrption:</label> 
		  <textarea id="card_desc" name="card_desc" class="cardDesc" >{{card_details.description}}</textarea>
		</p>
       </div>
       <div>
		<input type="submit" class="submitbutton" value="Save"/>
		<input type="button" class="cancelbutton" value="Cancel" onclick="window.close()"/>
       </div>
	  
    </div>
  </form>
</body>
</html>
